package com.yuxi.crystal.animation;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

import com.yuxi.crystal.animation.viewAnimation.ViewAnimationActivity;

public class MainActivity extends AppCompatActivity implements View.OnClickListener{

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        intiView();
    }

    private void intiView() {
        findViewById(R.id.bt_property_animation).setOnClickListener(this);
        findViewById(R.id.buttonView).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.bt_property_animation://属性动画
                startActivity(new Intent(MainActivity.this,PropertyAnimation.class).setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP));
                break;
            case R.id.buttonView://视图动画
                startActivity(new Intent(MainActivity.this,ViewAnimationActivity.class));
                break;
        }
    }
}
